<apes-header>
  <apes-button-list class="buttonList" [ctx]="ctx" [buttonBarMetadata]="buttonBar"
                    (click)="onEvent($event)"></apes-button-list>
</apes-header>
<!-- 供应商报价监控 -->
<apes-content>
  <apes-card [apesBordered]="false">
    <p [ngStyle]="{ display: hind }"><i class="anticon anticon-exclamation-circle-o"></i> 查询条件不能为空！ </p>
    <!-- 查询条件(固定) -->
    <div class="boxShowFlex">
      <!-- 单据号码 -->
      <div apes-col apesSpan="8">
        <div>
          <span>单号</span>
          <div class="boxDiv">
            <input apes-input [(ngModel)]="id"/>
          </div>
        </div>
      </div>
      <!-- 发起时间 -->
      <div apes-col apesSpan="8">
        <div>
          <span>发起时间</span>
          <div class="boxDiv">
            <apes-range-picker [(ngModel)]='mdjcTime' [apesFormat]="'yyyy-MM-dd'"></apes-range-picker>
          </div>
        </div>
      </div>
      <!-- 流程名称 -->
      <div apes-col apesSpan="8">
        <span>流程名称</span>
        <ng-select style="width: 240px; display: inline-block;"
                   clearAllText
                   [items]="store"
                   bindLabel="NAME"
                   bindValue="NAME"
                   [placeholder]="'选填'" [notFoundText]="'无法找到'" typeToSearchText [(ngModel)]="nameID">
        </ng-select>
      </div>
      <!-- 待办部门 -->
      <div apes-col apesSpan="8">
        <span>待办部门</span>
        <ng-select style="width: 240px; display: inline-block;"
                   [items]="branch"
                   bindLabel="name"
                   bindValue="id"
                   clearAllText [placeholder]="'选填'" [(ngModel)]="branchID" [notFoundText]="'无法找到'" typeToSearchText>
        </ng-select>
      </div>
      <!-- 待办岗位 -->
      <div apes-col apesSpan="8">
        <span>待办岗位</span>
        <ng-select style="width: 240px; display: inline-block;"
                   [items]="workPost"
                   bindLabel="name"
                   bindValue="id"
                   clearAllText [placeholder]="'选填'" [(ngModel)]="workID" [notFoundText]="'无法找到'" typeToSearchText>
        </ng-select>
      </div>
      <!-- 待办人 -->
      <div apes-col apesSpan="8">
        <span>待办人</span>
        <ng-select style="width: 240px; display: inline-block;"
                   clearAllText
                   [items]="user"
                   bindLabel="name"
                   bindValue="id"
                   [placeholder]="'选填'" [notFoundText]="'无法找到'" typeToSearchText [(ngModel)]="userID">
        </ng-select>
      </div>
      <!-- 发起人 -->
      <div apes-col apesSpan="8">
        <span>发起人</span>
        <ng-select  style="width: 240px; display: inline-block;"
                    typeToSearchText
                    [items]="user"
                    bindLabel="name"
                    bindValue="id"
                    placeholder="选填"
                    [(ngModel)]="usersID"
                    [notFoundText]="'无法找到'">
        </ng-select>
      </div>
      <!-- 状态 -->
      <!--<div apes-col apesSpan="8" style="text-align: center">-->
        <!--<apes-radio-group [(ngModel)]="checkKeys">-->
          <!--<label apes-radio apesValue= '0'>未完结</label>-->
          <!--<label apes-radio apesValue= '1'>已完结</label>-->
        <!--</apes-radio-group>-->
      <!--</div>-->
    </div>

    <!-- 查询条件（外加） -->
    <div class="boxShow" apes-row apesGutter="24" apesSpan="16" [ngStyle]="{ display: show }">
      <!-- 发起人 -->
      <div apes-col apesSpan="8">
        <span>发起人</span>
        <ng-select  style="width: 240px; display: inline-block;"
                    typeToSearchText
                    [items]="user"
                    bindLabel="name"
                    bindValue="id"
                    placeholder="选填"
                    [(ngModel)]="usersID"
                    [notFoundText]="'无法找到'">
        </ng-select>
      </div>

      <!-- 发起部门 -->
      <div apes-col apesSpan="8">
        <span>发起部门</span>
        <ng-select style="width: 240px; display: inline-block;"
                   [items]="branch"
                   bindLabel="name"
                   bindValue="id"
                   clearAllText [placeholder]="'选填'" [(ngModel)]="branID" [notFoundText]="'无法找到'" typeToSearchText>
        </ng-select>
      </div>
    </div>

    <!-- 显示内容 -->
    <div apes-row apesGutter="24" apesSpan="16">

      <!-- 左侧 数据展示 -->
      <div>
        <ag-grid-angular #grid
                         style="width: 100%;" [ngStyle]="{ height: height }" class="ag-theme-balham"
                         enableColResize="true"
                         enableSorting="true"
                         enableFilter="true"
                         [modules]="modules"
                         suppressLoadingOverlay="true"

                         [rowData]="rowData"
                         [gridOptions]="gridOptions"
                         [columnDefs]="columnDefs"
                         [pinnedBottomRowData]="pinnedBottomRowData"
                         [getContextMenuItems]="getContextMenuItems"
                         [rowClassRules]="rowClassRules">
        </ag-grid-angular>
      </div>
    </div>
  </apes-card>
</apes-content>
